﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Domain.Products
{
    /// <summary>
    /// BOM信息表
    /// </summary>
    [Table("bominfo")]
    public class BomInfo : Audit
    {
        /// <summary>
        /// 自增主键ID
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// BOM编号（GUID）
        /// </summary>
        public Guid BomNumber { get; set; } = Guid.NewGuid();

        /// <summary>
        /// 是否默认BOM
        /// </summary>
        public bool IsDefaultBom { get; set; } = false;

        /// <summary>
        /// BOM版本
        /// </summary>
        public string BomVersion { get; set; }

        /// <summary>
        /// 产品名称
        /// </summary>
        public string ProductName { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        public Guid? ProductNumber { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string SpecificationModel { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 日产量
        /// </summary>
        public int? DailyOutput { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remarks { get; set; }

        /// <summary>
        /// 绑定工艺路线(外键)
        /// </summary>
        public Guid? ProcessRouteNumber { get; set; }

        /// <summary>
        /// 逻辑删除
        /// </summary>
        public bool? IsDelete { get; set; } = false;
    }
}
